//
//  MovieTableViewCell.m
//  又是豆瓣
//
//  Created by dllo on 15/12/31.
//  Copyright © 2015年 dllo. All rights reserved.
//

#import "MovieTableViewCell.h"

@implementation MovieTableViewCell

#define WI self.contentView.frame.size.width
#define HE self.contentView.frame.size.height

- (void)dealloc {
    [super dealloc];
    [_imageV release];
    [_imgV release];
    [_title release];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createCell];
    }
    
    return self;
}

- (void)createCell {
    
    self.imgV = [[UIImageView alloc]init];
    [self.contentView addSubview:_imgV];
    [_imgV release];
    
    self.imageV = [[UIImageView alloc]init];
    [_imgV addSubview:_imageV];
    [_imageV release];
    
    self.title = [[UILabel alloc]init];
    [_imgV addSubview:_title];
    [_title release];
    


}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    _imgV.frame = CGRectMake(10, 10, WI - 20 , HE - 20 );
    _imgV.layer.cornerRadius = 10;
    
    _imageV.frame = CGRectMake(15, 5, 80, HE - 30);
    
    _title.frame = CGRectMake(110, 50, 200, 40);
    
    
    
}








- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
